package org.example;

import java.util.Arrays;

/**
 * @AUTHOR 尹书岿
 * @DATE 2024/12/9 11:09
 * @DESCRIBE
 */
public class demo2 {
    public static void main(String[] args) {
        int[] array = {1, 2, 3};
        System.out.println(array[0]);
        System.out.println(array.length);

        //打印1       for循环
        for (int i = 0; i < array.length; i++){
            System.out.println(array[i]);
        }

        //打印2    tostring方法
        System.out.println(Arrays.toString(array));
    }

}
